﻿<?php include("../conn.php");
mysql_query('SET NAMES UTF8'); 
class MyPrizeBean{
	public $title;
	public $images;
	public $id;
	function __construct($title,$images,$id)
	{
		$this->title      = $title;
		$this->images      = $images;
		$this->id      = $id;
		
	}
}


if($_REQUEST['page']!="")
{
$de=$_REQUEST['page']*$_REQUEST['pagesize'];
$size=$_REQUEST['pagesize'];
}

else
{
$de=0;
$size=10;
}


 
$rert30=mysql_query("select *from zifenlei where fenleiid='".$_REQUEST['cateid']."'limit $de,$size ");
	
$prize = array();

	
while($rowf=mysql_fetch_array($rert30)){
	$prize[] = new MyPrizeBean($rowf['name'],$rowf['images'],$rowf['id']);		
}
		
	

echo json_encode($prize);


?>